package com.hvgroup.modules.sanic.service.mapstruct;

import com.hvgroup.base.BaseMapper;
import com.hvgroup.modules.sanic.domain.po.UserQaRecord;
import com.hvgroup.modules.sanic.domain.dto.UserQaRecordDto;
import com.hvgroup.modules.system.service.mapstruct.UserMapper;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.ReportingPolicy;

@Mapper(componentModel = "spring", uses = {UserMapper.class}, unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface UserQaRecordMapper extends BaseMapper<UserQaRecordDto, UserQaRecord> {

    @Mapping(target = "userId", expression = "java(String.valueOf(entity.getUser().getId()))")
    UserQaRecordDto toDto(UserQaRecord entity) ;
}
